Skip to content

Conversation

@brianreavis
Copy link
Contributor

@alice-i-cecile alice-i-cecile added this to the 0.18 milestone Dec 29, 2025
@alice-i-cecile
Copy link
Member

That makes far more sense to me. Please bother me when CI is passing and I'll get this merged :)

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in A-UI Graphical user interfaces, styles, layouts, and widgets P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 30, 2025
@brianreavis
Copy link
Contributor Author

This PR will need rebuilt now that this was just merged:

Other future conflicts:

@brianreavis brianreavis added S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Dec 30, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 6, 2026
…eature flag needed (#22340)

# Objective

- Fixes #22305 
- Avoid feature flagging 

## Solution

Taking inspiration from #22309 and building off of #22333, this moves
the auto directional navigation to `bevy_ui` and creates a new system
parameter to be used when including automatic navigation.

- directional_navigation.rs of `bevy_input_focus` still contains the
`DirectionalNavigation` system parameter, but it now only contains logic
to do manual navigation. The `DirectionalNavigationPlugin` is still
there, as well as the manual edge map.
- I separated out some code from directional_navigation.rs into two
separate files:
1) directional_navigation.rs in `bevy_ui` which contains the automatic
navigation code. There is a new system parameter now,
`AutoDirectionalNavigator`, that wraps the `DirectionalNavigation`
system parameter and does automatic navigation if manual navigation
fails.
2) navigator.rs which contains some structs and functions that are used
by both the automatic navigation system and the manual navigation code
in directional_navigation.rs. This particular refactoring wasn’t
particularly necessary, but I feel like the code is little more cleaner
for it… I can revert this change if desired

If you think a feature is better for this, then let me know whether
#22333 should be considered instead.

If this gets merged, I’ll open up a pull request against `release-0.18`
to update the release notes, basically saying that users who want to
leverage `AutoDirectionalNavigation` need to use the
`AutoDirectionalNavigator` instead of the existing
`DirectionalNavigation` system param.

## Testing

To ensure no regressions, I tested the directional navigation examples
and both work as they did before.
`cargo run --example directional_navigation` - uses the existing
`DirectionalNavigation` system parameter
`cargo run --example auto_directional_navigation` - uses the new
`AutoDirectionalNavigator` system parameter
cart pushed a commit that referenced this pull request Jan 8, 2026
…eature flag needed (#22340)

- Fixes #22305
- Avoid feature flagging

Taking inspiration from #22309 and building off of #22333, this moves
the auto directional navigation to `bevy_ui` and creates a new system
parameter to be used when including automatic navigation.

- directional_navigation.rs of `bevy_input_focus` still contains the
`DirectionalNavigation` system parameter, but it now only contains logic
to do manual navigation. The `DirectionalNavigationPlugin` is still
there, as well as the manual edge map.
- I separated out some code from directional_navigation.rs into two
separate files:
1) directional_navigation.rs in `bevy_ui` which contains the automatic
navigation code. There is a new system parameter now,
`AutoDirectionalNavigator`, that wraps the `DirectionalNavigation`
system parameter and does automatic navigation if manual navigation
fails.
2) navigator.rs which contains some structs and functions that are used
by both the automatic navigation system and the manual navigation code
in directional_navigation.rs. This particular refactoring wasn’t
particularly necessary, but I feel like the code is little more cleaner
for it… I can revert this change if desired

If you think a feature is better for this, then let me know whether

If this gets merged, I’ll open up a pull request against `release-0.18`
to update the release notes, basically saying that users who want to
leverage `AutoDirectionalNavigation` need to use the
`AutoDirectionalNavigator` instead of the existing
`DirectionalNavigation` system param.

To ensure no regressions, I tested the directional navigation examples
and both work as they did before.
`cargo run --example directional_navigation` - uses the existing
`DirectionalNavigation` system parameter
`cargo run --example auto_directional_navigation` - uses the new
`AutoDirectionalNavigator` system parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Adopt-Me The original PR author has no intent to complete this work. Pick me up!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: bevy_winit now pulls in all of bevy_ui

2 participants